***********************************************************************
*
*       Programa que preenche o campo pm_cnatope = 612 ,cl_ncodcli # SP
*       do dbf pedidoma
*       Autor: Eng: Luis Lin
*       Date : 09.12.96
*
*
***********************************************************************
local ntab := 612
priv nCount
request dbfcdx
RddSetDefault('dbfcdx')
close databases
use clientes index ncodc new alias CFO
use pedidoma new alias PEDM
set relation  to cl_ncodcli into cfo
sele PEDM
go top

do while ! eof()
   if CFO->cl_cestcfo # "SP"
      PEDM->pm_cnatope := "612"
   endif
   skip
enddo
close databases
return .t.


Function DispBar()
LOCAL nCount := 0
Public nRec
@ 19,18,21,61 BOX B_DOUBLE
@ 20,19 clear to 20,60
@ 20,20 say chr(219)
nCount := 0
nRec := Reccount() / 40
return nCount

Function dacCount(xStr, nCount)
Public nRec
IF  nCount == NIL
    RETURN xStr
END
nCount ++
if nCount > nRec
   @ 20, col() say chr(219)
   nCount := 0
endif
RETURN xStr

